package cn.iocoder.yudao.module.trade.api.receiptinfo;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.trade.api.receiptinfo.dto.ReceiptInfoDTO;
import cn.iocoder.yudao.module.trade.dal.dataobject.receiptinfo.ReceiptInfoDO;
import cn.iocoder.yudao.module.trade.dal.mysql.receiptinfo.ReceiptInfoMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ReceiptinfoApiImpl implements ReceiptinfoApi{

    @Resource
    private ReceiptInfoMapper receiptInfoMapper;

    @Override
    public int saveReceiption(ReceiptInfoDTO infoDTO) {
        int insert = receiptInfoMapper.insert(BeanUtils.toBean(infoDTO, ReceiptInfoDO.class));
        return insert;
    }
}
